//
//  ImageScrollTableViewCell.m
//  GoShops
//
//  Created by zcj on 15-11-22.
//  Copyright (c) 2015年 郑朝军. All rights reserved.
//

#import "ImageScrollTableViewCell.h"
#import "ScrollImageView.h"

@implementation ImageScrollTableViewCell

+(instancetype)ImageScrollTableViewCell:(UITableView *)tableView frame:(CGRect)frame
{
    static NSString *menuID = @"imagescroll";
    ImageScrollTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:menuID];
    if (cell == nil) {
        cell = [[ImageScrollTableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:menuID frame:frame];
    }
    return cell;
}
- (void)setImageScrollss:(CGRect)frame
{
    self.imageScrollView = [[ScrollImageView alloc]initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height) imageArray:self.imageArr];
    [self.contentView addSubview:self.imageScrollView];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier frame:(CGRect)frame {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier ];
    if (self) {
        [self setImageScrollss:frame];
    }
    return self;
}
// 设置图片
-(void)setImageArray:(NSArray *)imageArray
{
    [self.imageScrollView setImageArray:imageArray];
    //[self.imageScrollView setImgArray:imageArray];
}


- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
